<!--main-->
<div id="wrapper"> 
	<fieldset>
		<legend>
    <%= link_to '添加焦点图', new_carousel_path %>
    <%= link_to '文章列表', '/topics/category/1' %>
    </legend>
      <table style="width:100%" class="table table-bordered">
        <thead>
          <th width="450px">标题</th>
          <th>状态</th>
          <th>链接</th>
          <th>超首</th>
          <th>网站</th>
          <th>管理</th>
        </thead>
        <tbody>
        <% @carousels.each do |c| %>
          <tr>
            <td><%= c.title %></td>
            <td>
            <% if c.status == 0 %>启用
            <% elsif c.status == 1 %>禁用
            <% end %>
            </td>
            <td><%= c.linkto %></td>
            <td>
            <% if c.page == 1%>显示
            <% elsif c.page == 0%>不显示
            <% end %>
            </td>
            <td>
            <% if c.site == 1%>显示
            <% elsif c.site == 0%>不显示
            <% end %>
            </td>
            <td>
            <%= link_to edit_carousel_path(c.id), :class => 'ddm' do %>
              <span class="icon icon145"></span>
            <% end %>
            <%= link_to carousel_path(c.id), :method => :delete, :confirm => '确定删除此记录吗?', :class => 'ddm' do %>
              <span class="icon icon186"></span>
            <% end %>
            </td>
          </tr>
          <% end %>
        </tbody>
      </table>
      </fieldset>
      </div>
